package com.dream.inspect.modules.business.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dream.inspect.common.utils.PageUtils;
import com.dream.inspect.common.utils.Query;
import com.dream.inspect.modules.business.dao.InstructionsTargetDao;
import com.dream.inspect.modules.business.entity.InstructionsTargetEntity;
import com.dream.inspect.modules.business.service.InstructionsTargetService;
import com.dream.inspect.modules.dream.pojo.InstrucationsTargetFormMap;


@Service("instructionsTargetService")
public class InstructionsTargetServiceImpl extends ServiceImpl<InstructionsTargetDao, InstructionsTargetEntity> implements InstructionsTargetService {

	@Resource
	private InstructionsTargetDao instructionsTargetDao;
	
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<InstructionsTargetEntity> page = this.selectPage(
                new Query<InstructionsTargetEntity>(params).getPage(),
                new EntityWrapper<InstructionsTargetEntity>()
        );

        return new PageUtils(page);
    }

	@Override
	public List<InstrucationsTargetFormMap> findTargetByInstructionsId(Map<String, Object> params) {
		List<InstrucationsTargetFormMap> list = instructionsTargetDao.findTargetByInstructionsId(params);
		return list;
	}

}
